home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 November: Tool Chest / Dev.CD Nov 00 TC Disk 1.toast / Sample Code / Networking / GetPPPStatus / FinderRegistry.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-09-28  |  9.2 KB  |  369 lines  |  [TEXT/CWIE]

  1. /*
  2.     File:        FinderRegistry.h
  3.  
  4.     Contains:    Classes, properties and data types used by the Scriptable Finder
  5.  
  6.     Written by: Francis Stanbach & Greg Anderson    
  7.  
  8.     Copyright:    Copyright © 1991-1999 by Apple Computer, Inc., All Rights Reserved.
  9.  
  10.                 You may incorporate this Apple sample source code into your program(s) without
  11.                 restriction. This Apple sample source code has been provided "AS IS" and the
  12.                 responsibility for its operation is yours. You are not permitted to redistribute
  13.                 this Apple sample source code as "Apple sample source code" after having made
  14.                 changes. If you're going to re-distribute the source, we require that you make
  15.                 it clear in the source that the code was descended from Apple sample source
  16.                 code, but that you've made changes.
  17.  
  18.     Change History (most recent first):
  19.                 7/22/1999    Karl Groethe    Updated for Metrowerks Codewarror Pro 2.1
  20.                 
  21.  
  22. */
  23. #ifndef __FINDERREGISTRY__
  24. #define __FINDERREGISTRY__
  25. #define FinderRegistry_h
  26.  
  27. #ifndef __AEREGISTRY__
  28. #include "AERegistry.h"
  29. #endif
  30.  
  31. ////////////////////////////////////////
  32. // Finder Suite
  33. ////////////////////////////////////////
  34.  
  35. //
  36. // The old Finder Event suite was 'FNDR'
  37. // The new suite is 'fndr'
  38. //
  39. enum {
  40.     kAEFinderSuite                = 'fndr'
  41. };
  42.  
  43. ////////////////////////////////////////
  44. // Finder Events
  45. ////////////////////////////////////////
  46.  
  47. /*enum {
  48.     kAECleanUp                    = 'fclu',
  49.     kAEEject                    = 'ejct',
  50.     kAEEmpty                    = 'empt',
  51.     kAEErase                    = 'fera',
  52.     kAEGestalt                    = 'gstl',
  53.     kAEPutAway                    = 'ptwy',
  54.     kAERebuildDesktopDB            = 'rddb',
  55.     kAESnooze                    = 'snoz',                // Go to sleep
  56.     kAEUpdate                    = 'fupd'
  57. };*/
  58.  
  59. ////////////////////////////////////////
  60. // Classes
  61. ////////////////////////////////////////
  62.  
  63. enum {
  64.     cFinder                        = cApplication,        // the finder object ≈ null
  65.  
  66.     cDisk                        = 'cdis',
  67.     cFolder                        = 'cfol',
  68.     cTrash                        = 'ctrs',
  69.     cDesktop                    = 'cdsk',
  70.     cContainer                    = 'ctnr',                // Disks, folders, trashes, desktops, suitcases
  71.     cSharableContainer            = 'sctr',                // Disks and folders
  72.     cSuitcase                    = 'stcs',
  73.     cFontSuitcase                = 'fsut',
  74.     cAccessorySuitcase            = 'dsut',
  75.  
  76.     cAliasFile                    = 'alia',
  77.  
  78.     cApplicationFile            = 'appf',
  79.     cDocumentFile                = 'docf',
  80.     cControlPanel                = 'ccdv',
  81.     cDeskAccessoryFile            = 'dafi',
  82.     cSoundFile                    = 'sndf',
  83.     cFontFile                    = 'fntf',
  84.  
  85.     cContentSpace                = 'dwnd',                // Content space:  includes desktop window & other windows
  86.     cContainerWindow            = 'cwnd',
  87.     cInfoWindow                    = 'iwnd',
  88.     cSharingWindow                = 'swnd',
  89.     cStatusWindow                = 'qwnd',                // Empty trash progress, 'copy' window
  90.  
  91.     cPrivilege                    = 'priv',
  92.     cGestalt                    = 'cgst',
  93.     cProcess                    = 'prcs',                // Information about a process running on this machine (like cApplication)
  94.     cAccessoryProcess            = 'pcda',
  95.     cApplicationProcess            = 'pcap',
  96.  
  97.     cEntireContents                = 'ects',
  98.  
  99.     cUser                        = 'cuse',
  100.     cGroup                        = 'sgrp',
  101.  
  102.     cIconFamily                    = 'ifam'
  103. };
  104.  
  105. ////////////////////////////////////////
  106. // Properties
  107. ////////////////////////////////////////
  108.  
  109. //
  110. // Properties of cObject:
  111. //
  112. enum {
  113.     pComment                    = 'comt',
  114.     pContainer                    = cContainer,            // The container the object is stored in
  115.     pCreationDate                = 'crtd',
  116.     pDemiWindow                    = cContentSpace,
  117.     pDisk                        = cDisk,                // the disk the object is stored on
  118.     pIconBitmap                    = 'iimg',
  119.     pInformationWindow            = cInfoWindow,            // Get info window
  120.     pStatusWindow                = cStatusWindow,        // Status window (copy, empty trash, rebuild desktop database)
  121.     pIsLocked                    = 'islk',
  122.     pIsSelected                    = 'issl',
  123.     pKind                        = 'kind',
  124.     pModificationDate            = 'modd',
  125.     pPhysicalSize                = 'phys',
  126.     pPosition                    = 'posn',
  127.     pSize                        = pPointSize,            // both are called "Size" in their respective terminologies, so they must have the same four-character code
  128.     pWindow                        = cWindow
  129. };
  130.  
  131. //
  132. // Properties of cFile:
  133. //
  134. enum {
  135.     pCreatorType                = 'fcrt',
  136.     pFileType                    = 'fitp',
  137.     pVersion2                    = 'ver2'
  138. };
  139.  
  140. //
  141. // Properties of cAliasFile:
  142. //
  143. enum {
  144.     pOriginalItem                = 'orig'                // Item pointed to by alias
  145. };
  146.  
  147. //
  148. // Properties of cApplicationFile:
  149. //
  150. enum {
  151.     pAppPartition                = 'appt',
  152.     pSuggestedAppPartition        = 'sprt',
  153.     pMinAppPartition            = 'mprt'
  154. };
  155.  
  156. //
  157. // Properties of cContainer:
  158. //
  159. enum {
  160.     pContainerWindow            = cContainerWindow,    // Window that contains children
  161.     pEntireContents                = cEntireContents,
  162.     pLabelIndex                    = 'labi',
  163.     pExpanded                    = 'pexp',                // Same as kAEExpanded
  164.     pExpandable                    = 'pexa',
  165.     pCompletelyExpanded            = 'pexc',
  166.     pSharingWindow                = cSharingWindow,        // Sharing window
  167.     pView                        = 'pvew',
  168.     pPreviousView                = 'svew',                // The last listwindow (non-icon) view
  169.  
  170.     pSharing                    = 'shar',
  171.     pSharingProtection            = 'spro',
  172.     pExported                    = 'sexp',
  173.     pMounted                    = 'smou',
  174.     pInheritedPrivileges        = 'iprv',                // "Same as enclosing" checkbox
  175.     pOwner                        = 'sown',
  176.     pGroup                        = cGroup,
  177.     pOwnerPrivileges            = 'ownr',
  178.     pGroupPrivileges            = 'gppr',
  179.     pGuestPrivileges            = 'gstp'
  180. };
  181.  
  182. //
  183. // Properties of cDisk:
  184. //
  185. enum {
  186.     pCapacity                    = 'capa',
  187.     pEjectable                    = 'isej',
  188.     pFreeSpace                    = 'frsp',
  189.     pLocal                        = 'isrv',
  190.     pIsStartup                    = 'istd'
  191. };
  192.  
  193. //
  194. // Properties of cDesktop:
  195. //
  196. enum {
  197.     pTrash                        = 'trsh',                // Can't use cTrash, and pTrash must == kTrashFolderType
  198.     pStartupDisk                = 'sdsk'
  199. };
  200.  
  201. //
  202. // Properties of cTrash:
  203. //
  204. enum {
  205.     pWarnOnEmpty                = 'warn'
  206. };
  207.  
  208. //
  209. // Properties of cFinder / cApplication:
  210. //
  211. enum {
  212.     pAppleMenuItemsFolder        = 'amnu',                // kAppleMenuFolderType
  213.     pControlPanelsFolder        = 'ctrl',                // kControlPanelFolderType
  214.     pDesktop                    = 'desk',                // Can't use cDesktop, and pDesktop must == kDesktopFolderType
  215.     pExtensionsFolder            = 'extn',                // kExtensionFolderType
  216.     pFileShareOn                = 'fshr',
  217.     pFileShareStartingUp        = 'fsup',
  218.     pFontsFolder                = 'ffnt',
  219.  
  220.     pLargestFreeBlock            = 'mfre',
  221.     pPreferencesFolder            = 'pref',                // kPreferencesFolderType
  222.     pAboutMacintosh                = 'abbx',                // Open this to get 'About this Macintosh' window
  223.     pShortcuts                    = 'scut',                // Finder shortcuts in help menu
  224.     pShutdownFolder                = 'shdf',
  225.     pStartupItemsFolder            = 'strt',                // kStartupFolderType
  226.     pSystemFolder                = 'macs',                // kSystemFolderType
  227.     pTemporaryFolder            = 'temp',                // kTemporaryFolderType
  228.     pTimerItemsFolder            = 'timf',
  229.     pViewPreferences            = 'pvwp'                // Finder view preferences ("Views" control panel)
  230. };
  231.  
  232. //
  233. // View preferences properties
  234. //
  235. enum {
  236.     pViewFont                    = 'vfnt',
  237.     pViewFontSize                = 'vfsz',
  238.     pGridIcons                    = 'fgrd',
  239.     pListViewIconSize            = 'lvis',
  240.     pShowComment                = 'scom',
  241.     pShowDate                    = 'sdat',
  242.     pShowDiskInfo                = 'sdin',
  243.     pShowFolderSize                = 'sfsz',
  244.     pShowKind                    = 'sknd',
  245.     pShowLabel                    = 'slbl',
  246.     pShowSize                    = 'ssiz',
  247.     pShowVersion                = 'svrs',
  248.     pStaggerIcons                = 'fstg'
  249. };
  250.  
  251. //
  252. // Properties of cPrivilegs
  253. //
  254. enum {
  255.     pSeeFiles                    = 'prvr',
  256.     pSeeFolders                    = 'prvs',
  257.     pMakeChanges                = 'prvw'
  258. };
  259.  
  260. //
  261. // Properties of cProcess
  262. //
  263. enum {
  264.     pApplicationFile            = cApplicationFile,
  265.  
  266.     pDeskAccessoryFile            = cDeskAccessoryFile,
  267.     pIsScriptable                = 'isab',
  268.     pLocalAndRemoteEvents        = 'revt',
  269.     pPartitionSpaceUsed            = 'pusd',
  270.  
  271.     pFolder                        = cFolder,
  272.     pObject                        = cObject,
  273.     pSharableContainer            = cSharableContainer,
  274.     pSuitcase                    = cSuitcase,
  275.     pFontSuitcase                = cFontSuitcase,
  276.     pAccessorySuitcase            = cAccessorySuitcase
  277. };
  278.  
  279.  
  280. ////////////////////////////////////////
  281. // Enumerations defined by the Finder
  282. ////////////////////////////////////////
  283.  
  284. enum {
  285.     enumViewBy                    = 'vwby',
  286.     pSmallIcon                    = 'smic',
  287.     enumGestalt                    = 'gsen',
  288.     enumConflicts                = 'cflc',
  289.     enumExistingItems            = 'exsi'
  290. };
  291.  
  292. ////////////////////////////////////////
  293. // Types defined by the Finder
  294. ////////////////////////////////////////
  295.  
  296. enum {
  297.     typeIconFamily                = cIconFamily,            // An AEList of typeIconAndMask, type8BitIcon, & c.
  298.     typeIconAndMask                = 'ICN#',
  299.     type8BitIcon                = 'icl8',
  300.     type4BitIcon                = 'icl4',
  301.     typeSmallIconAndMask        = 'ics#',
  302.     typeSmall8BitIcon            = 'ics8',
  303.     typeSmall4BitIcon            = 'ics4'
  304. };
  305.  
  306. ////////////////////////////////////////
  307. // Keywords defined by the Finder
  308. ////////////////////////////////////////
  309.  
  310. enum {
  311.     keyIconAndMask                = 'ICN#',
  312.     key8BitIcon                    = 'icl8',
  313.     key4BitIcon                    = 'icl4',
  314.     keySmallIconAndMask            = 'ics#',
  315.     keySmall8BitIcon            = 'ics8',
  316.     keySmall4BitIcon            = 'ics4',
  317.  
  318.     keyAEUsing                    = 'usin',
  319.     keyAEReplacing                = 'alrp',
  320.  
  321.     keyLocalPositionList        = 'mvpl',
  322.     keyGlobalPositionList        = 'mvpg'
  323. };
  324.  
  325. ////////////////////////////////////////
  326. // New prepositions used by the Finder
  327. ////////////////////////////////////////
  328.  
  329. enum {
  330.     keyASPrepositionHas            = 'has ',
  331.     keyAll                        = 'kyal',
  332.     keyOldFinderItems            = 'fsel'
  333. };
  334.  
  335. ////////////////////////////////////////
  336. // New key forms used by the Finder
  337. ////////////////////////////////////////
  338.  
  339. enum {
  340.     formAlias                    = typeAlias,
  341.     formCreator                    = pCreatorType
  342. };
  343.  
  344. ////////////////////////////////////////
  345. // Finder error codes
  346. ////////////////////////////////////////
  347.  
  348. enum {
  349.     errFinderIsBusy                    = -15260,
  350.     errFinderWindowNotOpen            = -15261,
  351.     errFinderCannotPutAway            = -15262,
  352.     errFinderWindowMustBeIconView    = -15263,        // RequireWindowInIconView
  353.     errFinderWindowMustBeListView    = -15264,        // RequireWindowInListView
  354.     errFinderCantMoveToDestination    = -15265,
  355.     errFinderCantMoveSource            = -15266,
  356.     errFinderCantOverwrite            = -15267,
  357.     errFinderIncestuousMove            = -15268,        
  358.     errFinderCantMoveToAncestor        = -15269,        
  359.     errFinderCantUseTrashedItems    = -15270,
  360.     errFinderItemAlreadyInDest        = -15271,        // Move from folder A to folder A
  361.     errFinderUnknownUser            = -15272,        // Includes unknown group
  362.     errFinderSharePointsCantInherit    = -15273,
  363.  
  364.     errFinderBoundsWrong            = -15278,
  365.     errAEValueOutOfRange            = -15279
  366. };
  367.  
  368. #endif
  369.